package azku.photoviews;

import java.util.HashMap;
import java.util.Map;

import azku.entitys.EItemView;

public class XCache {
	private static XCache mInstance;
	private Map<Integer, EItemView> mPhotoItemDictionary;

	private XCache() {
		mPhotoItemDictionary = new HashMap<Integer, EItemView>();
	}

	public static XCache It() {
		if (mInstance == null)
			mInstance = new XCache();
		return mInstance;
	}

	public EItemView getValue(Integer key) {
		if (mPhotoItemDictionary.containsKey(key)) {
			return mPhotoItemDictionary.get(key);
		}
		return null;
	}

	public void setValue(Integer key, EItemView value) {
		mPhotoItemDictionary.put(key, value);
	}
}
